function createStore(data) {
  var state = data || {};
  var list = [];
  return {
    getState: function (prop) {
      return state[prop];
    },
    dispatch: function (key, value) {
      state[key.type] = value.value;
    },
  };
}
